textiter: bug fix in forward_search() and backward_search()
authorSébastien Wilmet <swilmet@gnome.org>
Mon, 24 Jun 2013 15:00:31 +0000 (17:00 +0200)
committerSébastien Wilmet <swilmet@gnome.org>
Mon, 24 Jun 2013 18:14:39 +0000 (20:14 +0200)
commitea4e88df868640ed727aa9a0ec11552673e94ccc
treef621cec84e9665703fe6dc86e3f43bbdad4657d5
parent99fa59c961121498820782d1faae0f1fe44beb1f
textiter: bug fix in forward_search() and backward_search()

When the search is case sensitive, g_utf8_normalize() is not called, so
the skip_decomp argument of the function forward_chars_with_skipping()
must be FALSE.

To verify that, when searching "éb", the count parameter of
forward_chars_with_skipping() have a different value:
- case sensitive: count = 2
- case insensitive: count = 3 (g_utf8_normalize() has been called)

The commit adds unit tests that didn't pass before, and that now pass
(without known regression, obviously).

https://bugzilla.gnome.org/show_bug.cgi?id=702977
gtk/gtktextiter.c
testsuite/gtk/textiter.c